package com.zjitc.config;

import com.zjitc.obj.User;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/3/6 15:56
 * @description:
 */
@Configuration
public class javaConfigDemo1 {


  @Bean(value = "user")
  public User user(){
    return new User("java config demo 1",0);
  }

  @Bean(value = "user2")
  //@Scope(value = BeanDefinition.SCOPE_PROTOTYPE)
  public User user2(){
    return new User("create user demo 1",2);
  }
}
